<h2 class="contentTitle">宝宝[{$baby_info['baby_realname']}]相片</h2>
<div>
年份浏览:
<a href="/index.php?s=/Admin/Alubm/PhotoList/baby_id/<?php echo $_GET['baby_id'];?>" target="navTab" rel="photo_list">所有</a>&nbsp;|&nbsp;
<?php
$year_current = date("Y",time());
$born_year = date("Y",$baby_info['baby_borndate']);
if(!is_null($baby_info['baby_borndate'])){
for(;$born_year<=$year_current;$born_year++){
	echo '<a href="/index.php?s=/Admin/Alubm/PhotoList/baby_id/'.$_GET['baby_id'].'/photo_year/'.$born_year.'" target="navTab" rel="photo_list">'.$born_year.'</a>&nbsp;|&nbsp;';
}
}
?>
</div>
<div>
<?php
if(isset($_GET['photo_year'])){
for($i=1;$i<=12;$i++){
echo '<a href="/index.php?s=/Admin/Alubm/PhotoList/baby_id/'.$_GET['baby_id'].'/photo_year/'.$_GET['photo_year'].'/photo_month/'.$i.'" target="navTab" rel="photo_list">'.$i.'</a>&nbsp;&nbsp;';
}
}
?>

<hr>
<div>
<table class="list" width="100%">
<thead>
    	<tr>
        	<th width="30">序</th>
            <th width="100">拍摄日期</th>
            <th width="100">相片</th>
            <th>操作</th>
        </tr>
    </thead>
</table>
</div>

<div layouth="104" id="photo_list">
	<table class="list" width="100%">
    	<tbody>
        <volist name="data_photo_result" id="rs">
        	<tr>
            	<td width="30"></td>
            	<td width="100">{$rs['photo_year']}-{$rs['photo_month']}-{$rs['photo_day']}</td>
                <td align="left" width="80">
                <img src="<?php echo str_replace('.jpg','_100x75.jpg',$rs['photo_path']);?>" onload="DrawImage(this,800,560)" class="img_view" />
                </td>
                <td>
                <a href="#">编辑</a>&nbsp;|&nbsp;
                <a onclick="delPhoto('{$rs['id']}')" href="javascript:void(0)">删除</a>
                </td>
            </tr>
            </volist>
        </tbody>
    </table>
    </div>
    
</div>
<script type="text/javascript">
function delPhoto(id){
	$.ajax({
			url: '/index.php?s=/Admin/Alubm/delPhoto/id/'+id,
			type: 'GET',
			dataType: 'json',
			error: function(){
				alert('Server Error');
			},
			success: function(data){
				
			}
	});	
}
function lazy_img(){
	//$(".img_view").lazyload({effect : "fadeIn",placeholder : "/Public/images/grey.gif"});
}
lazy_img();
</script>